import Taro, { Component } from '@tarojs/taro'
import { Textarea } from '@tarojs/components'
import PropTypes from 'prop-types'
import { IProps } from './schemas'
import './index.scss'

export default class extends Component<IProps, {}> {

    render() {
        const { value = '', placeholder = '', style = {} } = this.props
        return (
            <Textarea
                value={value}
                placeholder={placeholder}
                style={style}
                autoHeight
                autoFocus
            />
        )
    }

    static propTypes = {
        value: PropTypes.string,
        placeholder: PropTypes.string,
        style: PropTypes.object,
    }

    static defaultProps = {
        value: '',
        placeholder: '',
        style: {},
    }

}